<template>
  <div>
    <View2d :rela="allRelations" :width="900" :height="800" v-if="allRelations" :types="types"></View2d>
  </div>
</template>

<script>
import { get_all_relations } from '@/network/api/graph'
import View2d from '@/components/View2d.vue'
export default {
  components: {
    View2d
  },
  data() {
    return {
      allRelations: null,
      types: ['魏国', '蜀国', '吴国', '群雄']
    }
  },
  methods: {
    async getAllRelations() {
      this.allRelations = await get_all_relations()
    }
  },
  mounted() {
    this.getAllRelations()
  },
}
</script>

<style scoped>

</style>

